package com.enjoyor.soa.traffic.rest.tsms.dubbo.invoke;

import org.springframework.stereotype.Component;

import com.alibaba.dubbo.config.annotation.Reference;
import com.enjoyor.soa.traffic.api.service.dubbo.gps.PositionService;
import com.enjoyor.soa.traffic.util.pojo.ResultPojo;

@Component
public class DubboPoliceInfoServiceInvoke {

	@Reference(timeout = 10000)
    private PositionService dubboPositionService ;

    /**
     * 获取警员状态信息
     * @return  StatusInfoDto
     */
    public ResultPojo getStatus(String policeId) {
        ResultPojo pojo = new ResultPojo();
    	if (null != dubboPositionService) {
    		pojo = dubboPositionService.getStatus(policeId, null ,null, null);
    	}
        return pojo;
    }
    
    /**
     * 获取警员列表信息
     * @return Position
     */
    public ResultPojo getPositionName() {
        ResultPojo pojo = new ResultPojo();
    	if (null != dubboPositionService) {
    		pojo = dubboPositionService.getPositionName();
    	}
        return pojo;
    }
}
